package com.hwz.mapper;

import com.github.pagehelper.Page;
import com.hwz.annotation.AutoFill;
import com.hwz.dto.SetmealPageQueryDTO;
import com.hwz.entity.Setmeal;
import com.hwz.entity.SetmealDish;
import com.hwz.enumeration.OperationType;
import com.hwz.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface SetmealMapper {
    Integer getCountByCategoryId(Long id);

    List<Long> getByDishids(List<Long> ids);

    @AutoFill(value = OperationType.UPDATE)
    void update(Setmeal setmeal);

    @AutoFill(value = OperationType.INSERT)
    void insert(Setmeal setmeal);

    Page<SetmealVO> selectByCondition(SetmealPageQueryDTO setmealPageQueryDTO);

    Setmeal getById(Long id);

    void deleteById(Long id);

    List<Setmeal> getByCategoryId(Long categoryId);

    Integer countByMap(Map map);
}
